<template>
  <div>
<!--整体-->
    <el-container>
<!--      上-->
      <el-header class="layout-header" >
        <h1>酷鲨商城运营管理平台</h1>
      </el-header>
<!--下整体-->
      <el-container class="layout-body">
<!--下左-->
        <el-aside  class="layout-aside" >
<!--          粘菜单-->
          <el-menu
              :router="true"
              :default-active="$router.currentRoute.path"
              class="el-menu-vertical-demo"

              background-color="#222c32"
              text-color="#fff"
              active-text-color="#fff">
            <el-menu-item index="/sys-admin/index">
              <i class="el-icon-s-home"></i>
              <span>首页</span>
            </el-menu-item>

<!--            标签作用为：可以展开-->
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>临时页面</span>
              </template>

<!--              展开后的子项-->
              <el-menu-item index="2-1" >
                <i class="el-icon-s-home"></i>
                <span>添加管理员</span>
              </el-menu-item>
              <el-menu-item index="2-2" >
                <i class="el-icon-s-home"></i>
                <span>管理员列表</span>
              </el-menu-item>
              <el-menu-item index="/sys-admin/temp/album/add-new">
                <i class="el-icon-s-home"></i>
                <span>添加相册</span>
              </el-menu-item>
              <el-menu-item index="/sys-admin/temp/album/list">
                <i class="el-icon-s-home"></i>
                <span>相册列表</span>
              </el-menu-item>
              <el-menu-item index="/sys-admin/temp/category/add-new">
                <i class="el-icon-s-home"></i>
                <span>添加类别</span>
              </el-menu-item>
              <el-menu-item index="/sys-admin/temp/category/list">
                <i class="el-icon-s-home"></i>
                <span>类别列表</span>
              </el-menu-item>
            </el-submenu>

            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>商品管理</span>
              </template>

              <el-menu-item index="3-1" >
                <i class="el-icon-s-home"></i>
                <span>SPU台账</span>
              </el-menu-item>
              <el-menu-item index="3-2" >
                <i class="el-icon-s-home"></i>
                <span>新增SPU</span>
              </el-menu-item>
            </el-submenu>

            <el-submenu disabled index="4">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>订单管理</span>
              </template>
            </el-submenu>

            <el-submenu disabled index="5">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>营销管理</span>
              </template>
            </el-submenu>

            <el-submenu disabled index="6">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>商家管理</span>
              </template>
            </el-submenu>

            <el-submenu disabled index="7">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>权限管理</span>
              </template>
            </el-submenu>


            <el-submenu index="8">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>导航一</span>
              </template>
              <el-menu-item-group>
                <template slot="title">分组一</template>
                <el-menu-item index="1-1">选项1</el-menu-item>
                <el-menu-item index="1-2">选项2</el-menu-item>
              </el-menu-item-group>
              <el-menu-item-group title="分组2">
                <el-menu-item index="1-3">选项3</el-menu-item>
              </el-menu-item-group>
              <el-submenu index="1-4">
                <template slot="title">选项4</template>
                <el-menu-item index="1-4-1">选项1</el-menu-item>
              </el-submenu>
            </el-submenu>
            <el-menu-item index="2">
              <i class="el-icon-menu"></i>
              <span slot="title">导航二</span>
            </el-menu-item>
            <el-menu-item index="3" disabled>
              <i class="el-icon-document"></i>
              <span slot="title">导航三</span>
            </el-menu-item>
            <el-menu-item index="4">
              <i class="el-icon-setting"></i>
              <span slot="title">导航四</span>
            </el-menu-item>
          </el-menu>
        </el-aside>
<!--        下右-->
        <el-main class="layout-main" >
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style>
.layout-header{
  background-color: #1684b0;
}
.layout-header h1{
  color: #fff;
  line-height: 60px;
}
.layout-body{
  /*绝对定位铺满屏幕*/
  position: absolute;
  top: 60px;
  bottom: 0;
  left: 0;
  right: 0;
}

.layout-aside{
  background-color: #222c32;
}
.layout-aside i{
  color:#ffffff !important;
}
.layout-main{
  background-color: #E9EEF3;
}
.el-manu-item.is-active{
  background: #2d3c4d !important;
}

</style>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'HomeView',
  components: {
    HelloWorld
  }
}
</script>
